Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1868: Check mandatory extensions #1891

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

f1sh1918
Copy link
Contributor

@f1sh1918 f1sh1918 commented Feb 4, 2025

Short description

Currently we accept creating cards from csv even if some mandatory extensions are not included in the csv (like startDay or cardType)

Proposed changes

  • add a check during the csv import if the initialized card has all mandatory extensions included and show an error message if sth is missing
  • adjust the unit tests that were quite flaky
  • add a unit test for the csv freinet import
  • add a mandatory flag to each extension

Note: In the future it may make sense to set the mandatory flags not on the extension directly but in the cardConfig for each project. So far i don't see the use case. Just to keep that in mind that we may refactor our extension config in the project config if its getting more complex

Side effects

  • csv import may break for the particular project

Testing

  1. Test the csv import for nuernberg and for bayern (normal & freinet)
  2. Check if csv data without the mandatory extensions can't be processed
    Bayern: Kartentyp
    NBG: Startdatum, Geburtsdatum, Pass-ID

Resolved issues

Fixes: #1868

…f the file includes all mandatory fields and show an error, adjust tests, add test for freinet csv import
@f1sh1918 f1sh1918 force-pushed the 1868-check-mandatory-extensions branch from ba2a555 to 5ba75ff Compare February 4, 2025 13:32
@f1sh1918 f1sh1918 marked this pull request as ready for review February 4, 2025 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSV bulk card creation works without mandatory extensions
1 participant